<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Variant Form 3 Pro</title>
    <style>
        :root {
            --tab-border-radius: 5px;
        }

        #vfApp {
            height: 100%;
        }

        .tab-container {
            display: flex;


        }

        .tab {
            position: relative;
            width: 100px;
            height: 30px;
            color: white;
            border-top-left-radius: var(--tab-border-radius);
            /* 上左圆角 */
            border-top-right-radius: var(--tab-border-radius);
            /* 上右圆角 */
            border-top-left-radius: var(--tab-border-radius);
            transform: perspective(10px) rotateX(2deg);
            transform-origin: bottom;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .tab:not(:first-child) {
            margin-left: -20px;
        }

        .tab:nth-child(1) {
            background: red;
        }

        .tab:nth-child(2) {
            background: green;
        }

        .tab:nth-child(3) {
            background: blue;
        }
    </style>
</head>

<body style="position: relative !important;">
    <div id="vfApp"></div>
    <div class="tab-container">
        <div class="tab">AAAAA</div>
        <div class="tab">BBBBB</div>
        <div class="tab">CCCCC</div>
    </div>

    <script>
        const tabs = document.querySelectorAll('.tab')
        let zIndex = tabs.length

        // 反向遍历tabs，使第一个tab的z-index最大
        for (let i = 0; i < tabs.length; i++) {
            tabs[i].style.zIndex = tabs.length - i
        }
    </script>
    <!--<script type="module" src="/src/main.js"></script>-->
</body>

</html>